package it.ap.sa.acqua.dao.model;
// Generated 23-ago-2017 17.05.29 by Hibernate Tools 4.3.1.Final

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * TFishImage generated by hbm2java
 */
@DynamicUpdate
@Cache(region = "it.eng.db.TFishImage", usage = CacheConcurrencyStrategy.READ_WRITE)
@Entity
@Table(name = "t_fish_image", schema = "public")
public class TFishImage implements java.io.Serializable {

	private Long id;

	private String title;

	private String author;

	private String license;

	private String source;

	private String url;

	private Long idFish;

	public TFishImage() {
	}

	public TFishImage(String title, String author, String license, String source, String url, Long idFish) {
		this.title = title;
		this.author = author;
		this.license = license;
		this.source = source;
		this.url = url;
		this.idFish = idFish;
	}

	@GenericGenerator(name = "generator", strategy = "org.hibernate.id.SequenceGenerator", parameters = @Parameter(name = "sequence", value = "sequence_id"))
	@Id
	@GeneratedValue(generator = "generator")

	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "title")
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "author")
	public String getAuthor() {
		return this.author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	@Column(name = "license")
	public String getLicense() {
		return this.license;
	}

	public void setLicense(String license) {
		this.license = license;
	}

	@Column(name = "source")
	public String getSource() {
		return this.source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	@Column(name = "url")
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Column(name = "id_fish")
	public Long getIdFish() {
		return this.idFish;
	}

	public void setIdFish(Long idFish) {
		this.idFish = idFish;
	}

	/**
	 * toString
	 * @return String
	 */
	public String toString() {
		StringBuffer buffer = new StringBuffer();

		buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
		buffer.append("id").append("='").append(getId()).append("' ");
		buffer.append("title").append("='").append(getTitle()).append("' ");
		buffer.append("author").append("='").append(getAuthor()).append("' ");
		buffer.append("license").append("='").append(getLicense()).append("' ");
		buffer.append("source").append("='").append(getSource()).append("' ");
		buffer.append("url").append("='").append(getUrl()).append("' ");
		buffer.append("idFish").append("='").append(getIdFish()).append("' ");
		buffer.append("]");

		return buffer.toString();
	}

}
